<?php
/* @var $this XappleController */
/* @var $model Xapple */

$this->breadcrumbs=array(
	'Xapples'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Xapple', 'url'=>array('index')),
	array('label'=>'Create Xapple', 'url'=>array('create' , 'cityid'=>$cityid)),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#xapple-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Xapples</h1>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'xapple-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'appleid',
		'cityid',
		'stat',
		'areaid',
		/*
		'province',
		'city',
		'name',
		*/
		array(
            'class'=>'CButtonColumn',
            'header' => '操作', //指明头信息
            'deleteConfirmation'=>"js:'是否要删除此内容?'",  //修改删除提示语句
            'template' =>'{view}{update}{delete}',
            'buttons' =>array(
                'view' => array(
                    'label'=>'显示',
                    'url'=>'Yii::app()->createUrl("xapple/view", array("id"=>$data->id , "cityid"=>$data->cityid))',  
                    
                ),
                'update' => array(
                    'label'=>'修改',
                    'url'=>'Yii::app()->createUrl("xapple/update", array("id"=>$data->id , "cityid"=>$data->cityid))',  
                ),
                'delete' => array(
                    'label'=>'删除',
                    'url'=>'Yii::app()->createUrl("xapple/delete", array("id"=>$data->id , "cityid"=>$data->cityid))',  
                ),
            ),
        ),
	),
)); ?>
